<?php
    require_once('inc/conexion.php');
?>    
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title></title>
    </head>
    <body>
        <table align="center">
            <tr>
                <td align="center"><a href="index.php"><img src="imagenes/index.png" /></a></td>
                <td align="center"><a href="peliculas.php">Pel&iacute;culas</a></td>
                <td align="center"><a href="series.php">Series</a></td>
                <td>
                    <?php
                        session_start();      
                        if (isset($_SESSION['usuario'])){
                            echo "Hola ".$_SESSION['usuario'];
                        }
                        else {
                    ?>
                    <form name="autenticacion" action="inc/validacion.php" method="POST">
                        <input name="email" type="text" placeholder="Usuario" />
                        <br />
                        <input name="password" type="password" placeholder="Contrase&ntilde;a" />
                        <input name="ruta" type="hidden" value="<?php echo basename($_SERVER['PHP_SELF']); ?>" />
                        <input type="submit" />
                    </form>
                    <?php
                        }
                    ?>
                </td>
            </tr>
        </table>
        <br />
        <br />
        <br />
        <table border="1" align="left">
            <tr>
                <td><b>Biblioteca</b></td>
            </tr>
            <tr>
                <td><a href="peliculas.php">Pel&iacute;culas</a></td>
            </tr>
            <tr>
                <td><a href="series.php">Series</a></td>
            </tr>
        </table>
    </body>
</html>
